package com.res.share.service.impl;

import com.res.share.model.ResLook;
import com.res.share.mapper.ResLookMapper;
import com.res.share.service.IResLookService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author astupidcoder
 * @since 2021-10-03
 */
@Service
public class ResLookServiceImpl extends ServiceImpl<ResLookMapper, ResLook> implements IResLookService {


    @Override
    public List<Integer> findArtLookData(String ipAddr) {
        return baseMapper.findArtLookData(ipAddr);
    }

    @Override
    public void saveArtLookSee(Integer articleId, String ipAddr) {
        ResLook resLook=new ResLook();
        resLook.setArtId(articleId);
        resLook.setIp(ipAddr);
        baseMapper.insert(resLook);
    }

}
